package com.zzyd.factory.net;


import com.zzyd.common.Common;
import com.zzyd.factory.Factory;

import okhttp3.OkHttpClient;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;

/**
 * @author wjunjie
 * @version 1.0
 * @E-mail wang_junjie007@163.com
 * @company ZZYD
 * @createTime 2018/7/23 15:49
 * @类注释:
 */
public class NetWork {
    public static Retrofit getRetrofit(){
        OkHttpClient client=new OkHttpClient.Builder().build();

        Retrofit.Builder builder=new Retrofit.Builder();
        Retrofit retrofit = builder.baseUrl(Common.CommonApi.BASR_URL)
                .client(client)
                .addConverterFactory(GsonConverterFactory.create(Factory.getGson()))
                .build();

        return retrofit;
    }
}
